package com.secondhand.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.secondhand.domain.good;
import com.secondhand.domain.user;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface goodMapper extends BaseMapper<good> {

    List<good> getGoodByTypeId(@Param("typeid") int typeid);
    int deleteGood(@Param("goodid") int goodid);
    //修改商品状态为不可见
    void updateGoods(int goodId);
    //修改商品状态为已卖出
    void goodBoughtState(int goodId);
    //获取已售出商品信息列表
    List<good> gainSoldGoodsList(@Param("userId") int userId);
    //获取未售出商品信息列表
    List<good> gainUnSoldGoodsList(@Param("userId") int userId);
    //获取已拍下商品信息列表
    List<good> gainSoldingGoodsList(@Param("userId") int userId);
    //修改商品信息
    Boolean updateGood(good good);
}
